<% if @actionPage.partners.present? or current_user.nil? %>
  <%= fields_for :subscription do |subscription_fields| %>

    <%= subscription_fields.email_field :email, class: "form-control",
                              placeholder: "Email #{t(:optional)}",
                              "aria-label": "Email #{t(:optional)}" if email %>

    <% if current_user.nil? and params[:partner].nil? %>
      <div class="newsletter-signup text-left">

        <%= render "tools/petition_location", f: subscription_fields if location %>

        <div class="signup-checkbox">
          <input type="checkbox" name="subscribe" value="1" <%= "checked" if params[:subscribe] == "1" -%> id="do-subscribe" >
          <b><%= t(:sign_up_for_mailings_from_org, name: t(:organization_abbreviation)) -%></b>
          <%= t(:why_sign_up_for_mailings_from_org, name: t(:organization_abbreviation)) -%>
        </div>

        <%= render "tools/privacy_notice" if privacy_notice %>

      </div>
    <% end %>

    <% visible_partners.each do |partner| %>
      <div class="newsletter-signup partner signup-checkbox text-left">
        <input type="checkbox" name=<%= "#{partner.code}_subscribe" %> value="1" <%= "checked" if params[:subscribe] == "1" -%> id="do-subscribe" >
        <b><%= t :sign_up_for_mailings_from_org, name: partner.name %></b>

        (<%= link_to 'privacy policy', partner.privacy_url -%>).
      </div>
    <% end %>

  <% end %>
<% end %>
